package com.zbkj.service.coupons.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 储值余额兑换消费券请求实体
 */
@Data
@ApiModel(value = "BalanceToCouponRequest", description = "储值余额兑换消费券请求")
public class BalanceToCouponRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户ID")
    private Integer userId;

    @ApiModelProperty(value = "兑换金额", required = true)
    @NotNull(message = "兑换金额不能为空")
    @DecimalMin(value = "0.01", message = "兑换金额必须大于0")
    private BigDecimal exchangeAmount;

    @ApiModelProperty(value = "备注")
    private String remark;
}